Release 10.1A: OpenEdge Reporting:
Query/Results for Windows
Creating filters
When you create a query, Results retrieves all the records in the tables you select. However, sometimes you might want to retrieve only a subset of these records. For example, you might want to refine the selection criteria for a query that retrieves customer invoices to retrieve only those invoices for customers in Massachusetts. You might further refine the query to retrieve only those invoices for customers in Massachusetts who have not paid for their merchandise.
To do this, you use a filter to create a set of instructions, called a WHERE clause, to instruct the query to retrieve only those records where the State field equals Massachusetts and the Balance field is greater than 0. In this example, the
WHERE clauseis written as follows:
In this example,
StateandBalanceare fields;MAis compared toStateusing the equality operator (=);0is compared toBalanceusing the greater than operator (>); the logical operatorANDbonds the two sections of the clause, called expressions, together. See Appendix B, "Comparison Operators," for a description of the available comparison operators.Results makes creating a
WHERE clauseeasy. Just select the elements you want to include in the clause and Results generates and formats the clause for you. If, however, you prefer to write and format clauses yourself, Results lets you create aWHERE clausemanually.Results provides you with two similar techniques to generate a
WHERE clause:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |